﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HRMS_Model;

namespace DataManager
{
  public class SkillManager
    {
        public static void AddSkills(Skill skillObj)
        {
            using (HRMSEntities skillEntity = new HRMSEntities())
            {
                Skill skill = new Skill();
                skill.SkillTypeId = skillObj.SkillTypeId;
                skill.SkillTypeName = skillObj.SkillTypeName;
                skillEntity.Skills.AddObject(skillObj);

            }
        }

        public static void AddSkillType(Skill skilltypeObj)
        {
            using (HRMSEntities skillEntity = new HRMSEntities())
            {
                SkillType skill = new SkillType();
                skill.SkillTypeName = skilltypeObj.SkillTypeName;
                skill.Information = skilltypeObj.SkillType.Information;
                skillEntity.Skills.AddObject(skilltypeObj);

            }
        }

    }
}
